$(function () {
    var table=document.getElementById("tbody-result");
    $.ajax({
        type:'GET',
        dataType:'json',
        url:contextPath+"/course/depend/"+theRequest.name,
        success:function (data) {
            console.log(data);
            var str="";
            for (var i=0;i<data.count;i++) {
                str+="<tr>" +
                    "<td>" + i + "</td>" +
                    "<td>" + data.list[i].lastcourse_name + "</td>" +
                    "<td>" + data.list[i].nextcourse_name + "</td>" +
                "</tr>"
            }
            table.innerHTML=str;
        },
        error:function () {
            alert("查询失败")
        }
    })
});